package cn.easybuy.dao.product;

import cn.easybuy.entity.Product;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductMapper {
    int add(Product product);
    int update(Product product);
    int delete(Integer id);
    Product selectProductInfoById(Integer id);
    List<Product> getProductList(@Param("name") String proName,
                                 @Param("categoryId") Integer categoryId,
                                 @Param("level") Integer level,
                                 @Param("from") Integer currentPageNo,
                                 @Param("pageSize") Integer pageSize);
    int getProductSearch(@Param("name") String proName,
                         @Param("categoryId")Integer categoryId,
                         @Param("level") Integer level);
    int updateStock(@Param("id") Integer id,
                    @Param("stock") Integer stock);

}
